xl: New savefile format. Save domain config when saving a domain.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 12 Apr 2010 16:46:10 +0000 (17:46 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 12 Apr 2010 16:46:10 +0000 (17:46 +0100)
commit01745ae6b53dfff62f2cd4d0ebd3500075b1b3d5
tree52c7adfee7506ba923f1ec01b1ffa5abb111dffb
parentb175259586a64137ca5dc55a51181eb1abedd1fb
xl: New savefile format. Save domain config when saving a domain.

We introduce a new format for saved domains.  The new format, in
contrast to the old:
  * Has a magic number which can distinguish it from other kinds of
  file
  * Is extensible
  * Can contains the domain configuration file

On domain creation we remember the actual config file used (using the
toolstack data feature of libxl, just introduced), and by default save
it to the save file.

However, options are provided for the following:
  * When saving a domain, supplying an alternative config file to
    store in the savefile.
  * When restoring a domain, supplying an alternative config file.

If a domain is restored with a different config file, it is the
responsibility of the xl user to ensure that the two configs are
"compatible".  Changing the targets of virtual devices is supported;
changing other features of the domain is not recommended.  Bad changes
may lead to undefined behaviour in the domain, and are in practice
likely to cause resume failures or crashes.

Old format save files generated by old versions of xl are not
supported.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/libxl/libxlu_cfg.c
tools/libxl/libxlutil.h
tools/libxl/xl.c